#pragma once

#include <string>

namespace El {
namespace Upgrade {

class UpgradeDiagnosis {
public:
    static UpgradeDiagnosis &GetInstance();

    bool Start();
    void Upgrade(const std::string &args);

private:
    bool CompareWithMtd(const std::string &upgrade_file);
    std::string FindUpgradeFile();  // 新增查找升级文件的方法

    UpgradeDiagnosis() = default;
    ~UpgradeDiagnosis() = default;

    UpgradeDiagnosis(const UpgradeDiagnosis &) = delete;
    UpgradeDiagnosis &operator=(const UpgradeDiagnosis &) = delete;
    UpgradeDiagnosis(UpgradeDiagnosis &&) = delete;
    UpgradeDiagnosis &operator=(UpgradeDiagnosis &&) = delete;
};

} // namespace Upgrade
} // namespace El